package com.zly.solon.config;

import com.zaxxer.hikari.HikariDataSource;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

import javax.sql.DataSource;

@Configuration
public class DataSourceConfig {
    @Bean(name = "db1",typed = true)
    public DataSource dataSource(@Inject("${mysql.db1}") HikariDataSource hikariDataSource) {
        return hikariDataSource;
    }
}
